import { baseUrl, doRequestPost, doRequestGet } from '../utils/request'
//未知事件
export function eventsList(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/pageList' + '?time=' + (+new Date()), query)
}

export function eventsDelete(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/delete' + '?time=' + (+new Date()), { 'eventId': query.eventId})
}

export function eventGet(query) {
  return doRequestGet(baseUrl + 'event/tEdEventInfo/selectById?eventId=' + query.eventId, {})
}

export function selectByIdNews(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/selectByIdNews' + '?time=' + (+new Date()), query)
}

export function selectByIdChains(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/selectByIdChains' + '?time=' + (+new Date()), query)
}

export function selectByIdStocks(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/selectByIdStocks' + '?time=' + (+new Date()), query)
}

export function searchInfo(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/searchNews' + '?time=' + (+new Date()), query)
}
export function unknownEventJoin(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/save' + '?time=' + (+new Date()), query)
}
export function eventJoin(query) {
  return doRequestPost(baseUrl + 'event/tEdEventInfo/join' + '?time=' + (+new Date()), query)
}

export function eventsSetList() {
  return doRequestGet(baseUrl + 'event/config/selectList' + '?time=' + (+new Date()), {})
}

export function getEventsSetInfo() {
  return doRequestGet(baseUrl + 'event/config/selectInfo' + '?time=' + (+new Date()), {})
}

export function evSetUpdate(query) {
  return doRequestPost(baseUrl + 'event/config/update' + '?time=' + (+new Date()), query)
}

export function getAllTags() {
  return doRequestGet(baseUrl + 'event/tEdEventKeywords/selectAllTags' + '?time=' + (+new Date()), {})
}

//已知事件
export function listAllInfo() {
  return doRequestGet(baseUrl + 'open/vocabulary/listAll/info' + '?time=' + (+new Date()), {})
}

export function knowEvtList(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/pageList' + '?time=' + (+new Date()), query)
}

export function knowEvtGet(query) {
  return doRequestGet(baseUrl + 'event/tEdEventScInfo/selectByIdSc?eventId=' + query.eventId, {})
}

export function selectByScNews(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/selectByScNews' + '?time=' + (+new Date()), query)
}

export function selectByNews(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/selectByNews' + '?time=' + (+new Date()), query)
}

export function selectByScStock(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/selectByScStock' + '?time=' + (+new Date()), query)
}

export function selectByRelStock(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/selectByRelStock' + '?time=' + (+new Date()), query)
}

export function delNews(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/delNews' + '?time=' + (+new Date()), query)
}

export function delStock(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/delStock' + '?time=' + (+new Date()), query)
}

export function evtUpdate(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/updateNews' + '?time=' + (+new Date()), query)
}

export function evtAudit(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/save' + '?time=' + (+new Date()), query)
}

export function evtGetStatus(query) {
	return doRequestGet(baseUrl + 'event/tEdEventScInfo/getStatus?eventId=' + query.eventId, {})
}

export function knowEvtDelete(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/cluster' + '?time=' + (+new Date()), query)
}

export function cacelCluster(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/cacelCluster' + '?time=' + (+new Date()), query)
}

export function knowEvtAddHotList(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/batchHot' + '?time=' + (+new Date()), query)
}

export function knowEvtDeletList(query) {
  return doRequestPost(baseUrl + 'event/tEdEventScInfo/batchCluster' + '?time=' + (+new Date()), query)
}

//主题
export function themeList(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/pageList' + '?time=' + (+new Date()), query)
}

export function batchGd(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/batchGd' + '?time=' + (+new Date()), query)
}

export function coreTagGet(query) {
  return doRequestGet(baseUrl + 'event/tEdEventKeywords/selectTagsNum?keyword=' + query.keyword, {})
}

export function evtStockGet(query) {
  return doRequestGet(baseUrl + 'event/tEdEventInfo/selectEventIdByTag?keyword=' + query.keyword, {})
}

export function themeDelete(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/updateStatus' + '?time=' + (+new Date()), query)
}

export function batchHot(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/batchHot' + '?time=' + (+new Date()), query)
}

export function themeContent(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/juhe' + '?time=' + (+new Date()), query)
}

export function themeGet(query) {
  return doRequestGet(baseUrl + 'event/topicInfo/selectById?id=' + query, {})
}

export function themeAddInfo(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/addInfo' + '?time=' + (+new Date()), query)
}

export function themeEditInfo(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/updateInfo' + '?time=' + (+new Date()), query)
}

export function newsByTheme(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/selectByNewsTopic' + '?time=' + (+new Date()), query)
}

//热点
export function hotList(query) {
  return doRequestPost(baseUrl + 'event/hotInfo/pageList' + '?time=' + (+new Date()), query)
}

export function hotPush(query) {
  return doRequestPost(baseUrl + 'event/hotInfo/ts' + '?time=' + (+new Date()), query)
}

export function hotBack(query) {
  return doRequestPost(baseUrl + 'event/hotInfo/cancelTs' + '?time=' + (+new Date()), query)
}

export function deleteHot(query) {
  return doRequestPost(baseUrl + 'event/hotInfo/yc' + '?time=' + (+new Date()), query)
}

export function getHotSet() {
  return doRequestGet(baseUrl + 'event/topicConfig/selectList' + '?time=' + (+new Date()), {})
}

export function getHotInfo() {
  return doRequestGet(baseUrl + 'event/topicConfig/selectInfo' + '?time=' + (+new Date()), {})
}

export function saveSet(query) {
  return doRequestPost(baseUrl + 'event/topicConfig/updateInfo' + '?time=' + (+new Date()), query)
}

export function newsByHot(query) {
  return doRequestPost(baseUrl + 'event/topicInfo/selectByIdNews' + '?time=' + (+new Date()), query)
}